from django.db import models

# Create your models here.
class User(models.Model):
    name = models.CharField(max_length=50)
    password = models.CharField(max_length=50)
    dj = models.BooleanField(default=0)
    class Meta:
        db_table = 'User'


class Fenlei(models.Model):
    name = models.CharField(max_length=50)
    class Meta:
        db_table = 'Fenlei'
    def __str__(self):
        return self.name

class Goods(models.Model):
    name = models.CharField(max_length=50)
    fenlei = models.ForeignKey(Fenlei,on_delete=models.CASCADE)
    class Meta:
        db_table = 'Goods'





